<template>
  <div style="height: 660px;margin-top: 15px; line-height: 50px;box-shadow:1px 1px 2px #a6a6a6;background-color: white">
    <div style="display: flex;gap: 10px">
      <div style="flex: 1.5;">
        <EssaySearch/>
      </div>
      <div style="flex: 1">
        <EssayCategory/>
      </div>
      <div style="flex: 3"/>
      <div style="flex: 1">
        <a-button type="primary" block @click="addEssay">写文章</a-button>
      </div>
      <div style="flex: 0.6">
        <EssayDelete/>
      </div>
    </div>
    <a-divider style="margin:auto"/>
    <div>
      <EssayDisplay/>
    </div>

  </div>
</template>

<script setup>

import EssaySearch from "@/components/admin/essay/EssaySearch"
import EssayCategory from "@/components/admin/essay/EssayCategory";
import EssayDisplay from "@/components/admin/essay/EssayDisplay";
import EssayDelete from "@/components/admin/essay/EssayDelete";
import {useRouter} from "vue-router";
import {useStore} from "vuex";


const router=useRouter()
const store=useStore()
const addEssay=()=>{
  store.commit(
      'setIsReturn',
      {
        isRe:true,
        rePath:"/admin/essay"
      })
  router.push("/admin/essay/add")
}

</script>

